import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/my',
    component: () => import('../views/MyView.vue')
  },
  {
    path: '/caculator',
    component: () => import('../views/Caculator.vue')
  },
  {
    path: '/guess',
    component: () => import('../views/GuessNumber.vue')
  },
  {
    path: '/emp',
    component: () => import('../views/Employee.vue')
  },
  {
    path: '/el',
    component: () => import('../views/ElementUI.vue')
  },
  {
    path: '/intro',
    component: () => import('../views/Introducation.vue')
  },
  {
    path: '/icon',
    component: () => import('../views/ElementIcon.vue')
  },
  {
    path: '/message',
    component: () => import('../views/ElementMessage.vue')
  },
  {
    path: '/radio',
    component: () => import('../views/ElementRadio.vue')
  },
  {
    path: '/choose',
    component: () => import('../views/ElementChoose.vue')
  },
  {
    path: '/switch',
    component: () => import('../views/ElementSwitch.vue')
  },
  {
    path: '/form',
    component: () => import('../views/ElementForm.vue')
  },
  {
    path: '/table',
    component: () => import('../views/ElementTable.vue')
  },
  {
    path: '/menu',
    component: () => import('../views/ElementMenu.vue')
  },
  {
    path: '/layout',
    component: () => import('../views/ElementLayout.vue')
  },
  {
    path: '/h_form',
    component: () => import('../views/HomeworkForm.vue')
  },
  {
    path: '/h_contain',
    component: () => import('../views/HomeworkContain.vue')
  },
  {
    path: '/carousel',
    component: () => import('../views/ElementCarousel.vue')
  },
  {
    path: '/popover',
    component: () => import('../views/ElementPopover.vue')
  },
  {
    path: '/card',
    component: () => import('../views/ElementCard.vue')
  },
  {
    path: '/all',
    component: () => import('../views/ElementPractiseAll.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
